package com.mmlc.meimei.lichengkongjian.customview;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ImageView;

/**
 * Created by Administrator on 2016/10/25 0025.
 */
public class MyImageView extends ImageView {
    public MyImageView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    float rawXDown;
    float rawYDownY;
  /*  @Override
    public boolean onTouchEvent(MotionEvent event) {
        super.onTouchEvent(event);
        switch (event.getAction()){
            case MotionEvent.ACTION_DOWN:
                rawXDown = event.getRawX();
                rawYDownY = event.getRawY();
                break;
            case MotionEvent.ACTION_MOVE:
               float rawXMove = event.getRawX();
               float rawYMove = event.getRawY();

                if(rawXDown - rawXMove > 10 || rawXDown - rawXMove < -10){
                    this.getParent().requestDisallowInterceptTouchEvent(false);
                    return false;
                }
                if(rawYDownY - rawYMove > 10 || rawYDownY - rawYMove < -10){
                    this.getParent().requestDisallowInterceptTouchEvent(false);
                    return false;
                }

                break;
        }
        return true;
    }*/
}
